package org.example.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


/**
 * @Author: Edward
 * @Date:2022-08-31 9:33
 * @subject:
 */
//@Data //为当前实体类的属性自动添加getter和setter和toString方法
//@NoArgsConstructor //生成一个无参的构造方法
//@AllArgsConstructor //生成一个包含所有属性的有参构造方法
public class Activation {
    private Integer aId;
    private String aName;
    private String aImg;
    @DateTimeFormat(pattern = "yyyy-MM-dd")  //处理前端传过来的参数格式转换
    @JsonFormat(pattern = "yyyy-MM-dd")  //要将一个日期类型以指定格式显示
    private Date aDate;
    private String aDescription;

    public Integer getaId() {
        return aId;
    }

    public void setaId(Integer aId) {
        this.aId = aId;
    }

    public String getaName() {
        return aName;
    }

    public void setaName(String aName) {
        this.aName = aName;
    }

    public String getaImg() {
        return aImg;
    }

    public void setaImg(String aImg) {
        this.aImg = aImg;
    }

    public Date getaDate() {
        return aDate;
    }

    public void setaDate(Date aDate) {
        this.aDate = aDate;
    }

    public String getaDescription() {
        return aDescription;
    }

    public void setaDescription(String aDescription) {
        this.aDescription = aDescription;
    }

    public Activation() {
    }

    public Activation(Integer aId, String aName, String aImg, Date aDate, String aDescription) {
        this.aId = aId;
        this.aName = aName;
        this.aImg = aImg;
        this.aDate = aDate;
        this.aDescription = aDescription;
    }

    @Override
    public String toString() {
        return "Activation{" +
                "aId=" + aId +
                ", aName='" + aName + '\'' +
                ", aImg='" + aImg + '\'' +
                ", aDate=" + aDate +
                ", aDescription='" + aDescription + '\'' +
                '}';
    }
}

